﻿Imports System.Windows.Forms

Public Class MDIParent1

    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs)
        ' Cree una nueva instancia del formulario secundario.
        Dim ChildForm As New System.Windows.Forms.Form
        ' Conviértalo en un elemento secundario de este formulario MDI antes de mostrarlo.
        ChildForm.MdiParent = Me

        m_ChildFormNumber += 1
        ChildForm.Text = "Ventana " & m_ChildFormNumber

        ChildForm.Show()
    End Sub

    Private m_ChildFormNumber As Integer

    Private Sub SalirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalirToolStripMenuItem.Click
        End
    End Sub

    Private Sub ProfesorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProfesorToolStripMenuItem.Click
        Form2.MdiParent = Me
        Form2.WindowState = FormWindowState.Maximized
        Form2.Show()
    End Sub

    Private Sub AlumnoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlumnoToolStripMenuItem.Click
        Form1.MdiParent = Me
        Form1.WindowState = FormWindowState.Maximized
        Form1.Show()
    End Sub

    Private Sub AlumnoToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlumnoToolStripMenuItem1.Click
        FrmBuscarAl.MdiParent = Me
        FrmBuscarAl.WindowState = FormWindowState.Maximized
        FrmBuscarAl.Show()
    End Sub

    Private Sub ProfesorToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProfesorToolStripMenuItem1.Click
        FrmBuscarPr.MdiParent = Me
        FrmBuscarPr.WindowState = FormWindowState.Maximized
        FrmBuscarPr.Show()
    End Sub
End Class
